package com.sicaolong.partterndesign._04_bridge;

import com.sicaolong.partterndesign._04_bridge.impl.CashPayment;
import com.sicaolong.partterndesign._04_bridge.impl.WechatPayment;
import com.sicaolong.partterndesign._04_bridge.subclass.Pad;
import com.sicaolong.partterndesign._04_bridge.subclass.Phone;

public class BridgeTest {

    public static void main(String[] args) {
        CashPayment cashPayment = new CashPayment();
        WechatPayment wechatPayment = new WechatPayment();
        Pad pad = new Pad(cashPayment);
        pad.pay();

        Phone phone = new Phone(wechatPayment);
        phone.pay();
    }
}
